# coding:utf-8
"""
    Author: walrus
    Date: 2024/11/7
    File: 1.3.py
"""
import re

with open("content.txt", "r", encoding = 'utf-8') as f:
    content = f.read()
    print(content)
    # reg = "[0-9]{2,5}?"    # ['12', '34', '56', '78', '23', '45', '67', '23', '45', '67']
    # reg = "[0-9]{2,5}+"    # ['12345', '678', '23456', '78', '23456', '78']
    # reg = "[0-9]*"           # 0次 到 任意次
    # reg = "[0-9]+"         # ['1', '12345678', '2345678', '2345678']
    # reg = "[0-9]?"         # 0次 或 1次
    # reg = "(?>[0-9]+)"
    reg = r"\w+@\w+\.[a-z]{2,4}"
    res = re.findall(reg, content)
    print(res)